package aiguigu1.one;

import java.util.Scanner;

/**
 * ClassName: ArrayExer02
 * Package: aiguigu1.one
 * Description:案例
 * 案例：输出英文星期几
 *
 * @Author ZY
 * @Create 2024/9/11 13:40
 * @Version 1.0
 */
public class ArrayExer02 {
    public static void main(String[] args){
        //定义包含7个单词的数组
        String[] arr = {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
        //键盘获取
        Scanner input = new Scanner(System.in);
        System.out.println("请输入1-7:");
        int number = input.nextInt();

        if (number < 1 || number >7){
            System.out.println("输入有误");
        }else {
            System.out.println(arr[number - 1]);
        }
        input.close();



    }
}
